package com.repair.repairSys.service.impl;

import java.util.List;
import com.repair.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.repair.repairSys.mapper.RepairUsersMapper;
import com.repair.repairSys.domain.RepairUsers;
import com.repair.repairSys.service.IRepairUsersService;

/**
 * 维修用户Service业务层处理
 * 
 * @author repair
 * @date 2024-12-05
 */
@Service
public class RepairUsersServiceImpl implements IRepairUsersService 
{
    @Autowired
    private RepairUsersMapper repairUsersMapper;

    /**
     * 查询维修用户
     * 
     * @param userId 维修用户主键
     * @return 维修用户
     */
    @Override
    public RepairUsers selectRepairUsersByUserId(String userId)
    {
        return repairUsersMapper.selectRepairUsersByUserId(userId);
    }

    /**
     * 查询维修用户列表
     * 
     * @param repairUsers 维修用户
     * @return 维修用户
     */
    @Override
    public List<RepairUsers> selectRepairUsersList(RepairUsers repairUsers)
    {
        return repairUsersMapper.selectRepairUsersList(repairUsers);
    }

    /**
     * 新增维修用户
     * 
     * @param repairUsers 维修用户
     * @return 结果
     */
    @Override
    public int insertRepairUsers(RepairUsers repairUsers)
    {
        repairUsers.setCreateTime(DateUtils.getNowDate());
        return repairUsersMapper.insertRepairUsers(repairUsers);
    }

    /**
     * 修改维修用户
     * 
     * @param repairUsers 维修用户
     * @return 结果
     */
    @Override
    public int updateRepairUsers(RepairUsers repairUsers)
    {
        return repairUsersMapper.updateRepairUsers(repairUsers);
    }

    /**
     * 批量删除维修用户
     * 
     * @param userIds 需要删除的维修用户主键
     * @return 结果
     */
    @Override
    public int deleteRepairUsersByUserIds(String[] userIds)
    {
        return repairUsersMapper.deleteRepairUsersByUserIds(userIds);
    }

    /**
     * 删除维修用户信息
     * 
     * @param userId 维修用户主键
     * @return 结果
     */
    @Override
    public int deleteRepairUsersByUserId(String userId)
    {
        return repairUsersMapper.deleteRepairUsersByUserId(userId);
    }
}
